package com.ruoyi.city.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.city.mapper.HouseDistrictMapper;
import com.ruoyi.city.domain.HouseDistrict;
import com.ruoyi.city.service.IHouseDistrictService;

/**
 * 区县信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-10
 */
@Service
public class HouseDistrictServiceImpl implements IHouseDistrictService 
{
    @Autowired
    private HouseDistrictMapper houseDistrictMapper;

    /**
     * 查询区县信息
     * 
     * @param districtId 区县信息主键
     * @return 区县信息
     */
    @Override
    public HouseDistrict selectHouseDistrictByDistrictId(Integer districtId)
    {
        return houseDistrictMapper.selectHouseDistrictByDistrictId(districtId);
    }

    /**
     * 查询区县信息列表
     * 
     * @param houseDistrict 区县信息
     * @return 区县信息
     */
    @Override
    public List<HouseDistrict> selectHouseDistrictList(HouseDistrict houseDistrict)
    {
        return houseDistrictMapper.selectHouseDistrictList(houseDistrict);
    }

    /**
     * 新增区县信息
     * 
     * @param houseDistrict 区县信息
     * @return 结果
     */
    @Override
    public int insertHouseDistrict(HouseDistrict houseDistrict)
    {
        return houseDistrictMapper.insertHouseDistrict(houseDistrict);
    }

    /**
     * 修改区县信息
     * 
     * @param houseDistrict 区县信息
     * @return 结果
     */
    @Override
    public int updateHouseDistrict(HouseDistrict houseDistrict)
    {
        return houseDistrictMapper.updateHouseDistrict(houseDistrict);
    }

    /**
     * 批量删除区县信息
     * 
     * @param districtIds 需要删除的区县信息主键
     * @return 结果
     */
    @Override
    public int deleteHouseDistrictByDistrictIds(Integer[] districtIds)
    {
        return houseDistrictMapper.deleteHouseDistrictByDistrictIds(districtIds);
    }

    /**
     * 删除区县信息信息
     * 
     * @param districtId 区县信息主键
     * @return 结果
     */
    @Override
    public int deleteHouseDistrictByDistrictId(Integer districtId)
    {
        return houseDistrictMapper.deleteHouseDistrictByDistrictId(districtId);
    }
}
